#include "pptctrl.h"

// Page* parent_page = NULL;




AppPptctrlPage::AppPptctrlPage(Page* parent) :AppPage(parent)
{
  this->viewport = new Container(this);
  this->viewport->set_size(220, 260);

  this->viewport->set_flex_layout(LV_FLEX_FLOW_COLUMN, false, false, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER);


  this->btn_page_up = new Button(this->viewport);
  this->btn_page_up->set_text("Page Up", THEME_COLOR_ORANGE);
  this->btn_page_up->set_size(120, 50);

  this->btn_space = new Button(this->viewport);
  this->btn_space->set_text("Space", THEME_COLOR_ORANGE);
  this->btn_space->set_size(120, 50);

  this->btn_page_down = new Button(this->viewport);
  this->btn_page_down->set_text("Page Down", THEME_COLOR_ORANGE);
  this->btn_page_down->set_size(120, 50);


}

AppPptctrlPage::~AppPptctrlPage()
{
  delete this->viewport;
  delete this->btn_page_up;
  delete this->btn_space;
  delete this->btn_page_down;
}





AppPptctrlPage* app_pptctrl_page = NULL;

void app_pptctrl_main(void* data)
{

  printf("app_pptctrl_main");

  Page* page = (Page*) data;

  app_pptctrl_page = new AppPptctrlPage(page);
  app_pptctrl_page->show();


}


void app_pptctrl_init()
{
  app_manger.install("ppt-ctrl", app_pptctrl_main, NULL, &ui_img_powerpoint_png, lv_color_hex(THEME_COLOR_ORANGE));
}


